import bsinRequest from '../utils/bsinRequest';
let workflowAdminPath = process.env.contextPath_workflowAdmin;

// 获取模板类型树
export const getModelTypeTree = (params: object) => {
  return bsinRequest(workflowAdminPath + '/modelType/getModelTypeTree', {
    serviceName: 'BsinAdminModelTypeService',
    methodName: 'getModelTypeTree',
    bizParams: {
      ...params,
    },
  });
};

// 新增模板类型
export const addModelType = (params: object) => {
  return bsinRequest(workflowAdminPath + '/modelType/add', {
    serviceName: 'BsinAdminModelTypeService',
    methodName: 'add',
    bizParams: {
      ...params,
    },
  });
};

// 修改模板类型
export const editModelType = (params: object) => {
  return bsinRequest(workflowAdminPath + '/modelType/edit', {
    serviceName: 'BsinAdminModelTypeService',
    methodName: 'edit',
    bizParams: {
      ...params,
    },
  });
};

// 删除模板类型
export const deleteModelType = (params: object) => {
  return bsinRequest(workflowAdminPath + '/modelType/delete', {
    serviceName: 'BsinAdminModelTypeService',
    methodName: 'delete',
    bizParams: {
      ...params,
    },
  });
};
